home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
UTILFILE
/
JLOCK.LZH
/
JLOCK.DOC
< prev
next >
Wrap
Text File
|
1989-01-02
|
26KB
|
592 lines
JLOCK.EXE
version 0.1a (c) copy right 1988 All Rights Reserved
Have you every typed "DEL *.COM" and then remembered that
you accidentally deleted your "VITAL!XY.COM" as well? or
renamed an important file somewhere inside a "RENAME *.TXT
*.TMP" by mistake? or executed a program which you really
shouldn"t have? or opened/copied a file which you did not
meant to? or did your/shareware/freeware program
accidentally delete files it shouldn"t have? (and your last
back up was done sometime last year).
This is a memory resident utility which controls the access
to a list of file names so that you can control whether
certain files may be opened, created, executed, deleted,
renamed or allowed to change file mode. Since files must be
opened before it can be copied, this controls file copying
also.
A user written list of files (in a file which you must
called JLOCK) along with access types allowed following it
will be read in, every time you run JLOCK.EXE. The list
can have up to 200 file names and the settings can be
viewed any time from the pop up menu. This program itself
can come out from memory any time you run big programs
which require almost all of the 640 kb available on a PC
"2" or the 544 kb on the older PC "1" without having to
reboot your computer.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you simply type
JLOCK<ntr>
then you get the help screen only. JLOCK.EXE will not
become memory resident, nor will it remove a copy of itself
if already in memory.
This mode is designed to remind you of some (not all) of
the parameters available when you run JLOCK.EXE without
having to refer to this document.
In case you're wondering about the wastefulness of storing
such mini-helps in the program, this and many other
messages stored in JLOCK.EXE are overwritten by your list
of file names when JLOCK.EXE becomes memory resident so
that the memory space is not wasted.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To run this, simply type
JLOCK RUN<ntr>
and end it with an <ENTER> or <ntr> or <cr> or anything
else you want to call the carriage return. This document
and all documents by my group uses the "<ntr>" format.
Just the letter "r" in "run" will work also. The <alt> and
"M" will pop up the menu in case you need to see which
files are J"lock"ed and what access rights are granted to
each file. The pop up menu itself has a mini-help of its
own: Just type <f1> as is stated on the menu.
You can load any other memory resident program AFTER the
JLOCK.EXE to be removed along with JLOCK.EXE, provided that
the other programs have my name mentioned somewhere or it
mentions that this program will wipe out that particular
program also. Do not run any other memory resident program
after JLOCK.EXE if not made by this group or specifically
mentions that JLOCK.EXE will wipe out that software also.
If you might wipe JLOCK.EXE from memory by accident, lock
up JLOCK.EXE with the "L" parameter at the command line so
that JLOCK.EXE cannot come out and destroy the memory map
of your system.
With the default above, there is no need to type a password
to pop up the pop up menu. The program can be wiped from
memory, and a chirping sound will be generated when you try
to (O)pen, (C)reate, (E)xecute, (D)elete, re(N)ame or
change file (M)ode for the list of file names you
specified.
Although there is no "C"opy option mentioned, the process
of copying a file requires that a file be opened first, so
setting a file so that it cannot be opened, automatically
prevents it from being copied as well.
You must provide a file called "JLOCK" without any
extension. This file must contain a list of file names and
the letter code for accesses which you allow:
To allow opening (copying) that file, follow its name with "o".
To allow creating a file by that name, follow its name with "c".
To allow execution of a program, follow its name with "e".
To allow deletion of a file, follow its name with "d".
To allow renaming of a file, follow its name with "n".
To allow a file to change mode (to read only, system file,
etc using various utilities available), follow its name
with "m".
For example, if the file has the following list
wordproc.exe e n<ntr>
act o d<ntr>
78 n<ntr>
12345678.com n<ntr>
keep<ntr>
then "wordproc.exe" is allowed to be executed and may be
renamed to something else. However, a file of this name
cannot be created, deleted, opened, or allowed to change
file mode. This means that if you type "DEL WORD*.EXE",
then every ".EXE" program which begins with "WORD" will be
deleted, except for "wordproc.exe", since this name is not
given access for deletion. Instead, a short beep (by
default) signals that an attempt to delete a protected file
occurred.
Similarly, the "act" file is allowed to be Opened so that
you can use your word processor to read and write it, and
you can even Delete it. But you cannot reName it to
something else, nor change file Mode to read-only. The
file called "78" cannot be reNamed but you can do anything
else. The file called "12345678.com" cannot be Executed
unless you intentionally reName it to some other name which
is not in the list. The presence of the "keep" file will be
display when you type DIR but cannot be typed out to screen
or deleted or changed in any way because no access is given
for any function.
Once you wipe out JLOCK.EXE from memory, then the above
list of files will behave as always, ready to be deleted or
renamed or executed by a slipperly finger or two.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To lock this program so that it will not come out of
memory, type
JLOCK L<ntr>
If you have other commands entered at this command line, it
is a good practice to separate the commands with at least
one space. There is no need to enter the Run command in
this case. If you enter the Run command, everything
afterwards is ignored. In other words, "JLOCK R L" will
run JLOCK.EXE but will not lock the program from wiping
itself out of memory.
If another program which can wipe itself was loaded BEFORE
JLOCK.EXE, then this feature will not work since the other
program's feature to wipe itself as well and this program
will take precedence.
Note that there are several high level languages available
on the market with features to make programs which can
become memory resident and also wipe itself out also.
However, none of those types of programs work unless it is
the last memory resident program you loaded. On top of
that, those types of programs take up an awful lot of
memory, while accomplishing relatively little.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To prevent the chirping sound (No-sound) when your program
or DOS tries to use a feature which is turned off, type
JLOCK N<ntr>
In this case, you do not have to type the "R" parameter to
run this.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To wipe this program and any other program ran after this
from memory,
JLOCK W<ntr>
DOS is given back the memory used by this program and any
other program loaded after this. This allows memory hungry
program to be ran without your having to reboot your
computer system.
Although this feature is only designed to work with other
programs made by my group, it can easily be expanded to work
with ANY OTHER programs. Care to have it expanded? I'd
like to hear from you.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To prevent the pop up menu from popping up unless you know
the password, type
JLOCK Ppassword<ntr>
All letters after the letter "p" until a space, tab or the
end of a line will be taken as the password. Although the
first letter "P" to indicate that the next line to follow
is the password itself can be in capital or small letter,
the password itself must match each capital or small letter
you type at the pop up prompt. So if your password is
"Cathy", then using "cathy" or "cAthy" at the pop up prompt
for a pass will not work. The password may be up to 78
characters long, including any character from chr$(33)
through chr$(255).
If you literally type
JLOCK pcAThy<ntr>
to run JLOCK.EXE, then when the prompt to enter the
password appears, you must literally type the "cAThy" as is
to access the pop up menu.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If a password is required, then you are given a default of
three times to type the proper password. To change the
number of tries allowed to 2, type
JLOCK T2<ntr>
The default is to allow three tries. Any value over 250 is
ignored, though any value over five or six doesn't make
much sense.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The pop up by default will appear on the left top column
and row, in other words on the column one and row one. To
change the default row and column of the left top corner of
the pop up menu, type
JLOCK -5 ^8
The top row is set for row five and the left column is set
for column eight. If only the row value exists as in
JLOCK -4
Then the top row is set for row five and the left column
takes on the default value of one. Similarly, if the
column value exists but no row value is given, then row
value is set for one by default.
The row value must be 35 or less and the column value must
be 32 or less. If you set the row value for anything above
19 on a CGA (color graphic adaptor) or a monochrome adaptor
equipped monitor, the pop up menu will not appear properly.
The excessively large value allowed for the row is for EGA
and VGA equipped monitors set to display 43/50 lines.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you have a color monitor, or at least a monochrome/amber
monitor, you can try a pop up other than the default black
letter on white background. Of course, even with a green
phosphor black/white monitor, you can try this to avoid
screen burn outs.
JLOCK A7<ntr>
This sets the screen for white letter on black background.
Of course, on amber/green monitor, it appears as
amber/green.
The default is 112 for reverse letter.
If you try
JLOCK A0<ntr>
then the default of 112 is used, because attribute = 0
means black letter on black background, which cannot be
seen. But 'c119' for white letters on white background is
acceptable, if for some reason the pop up menu should not be
visible.
To change the color on a color monitor to blue letters on
black, type
JLOCK A1
The values are the following for letter colors. To get the
color for the background, multipy by 16 and add to the
letter color value.
0 black 8 gray
1 blue 9 light blue
2 green 10 light green
3 cyan 11 light cyan
4 red 12 light red
5 magenta 13 light magenta
6 brown 14 yellow
7 white 15 bright white
For example, to get blue letters on green background, use
JLOCK A33<ntr>
since green background is 2 * 16 and blue letter is 1.
( 2 * 16 + 1 = 33 )
On IBM color monitors, the distinction is clear. On older
NEC MultiSync and similar monitors, the intensity control
has to be kept above a certain threshhold before they
become distinct.
On monochrome, the black letter on white background default
is recommended. Many combinations produce non-displaying
characters.
If you have Hercules' RAM Font or IBM EGA/VGA with expanded
character set beyond 256, then this may produce unusual
effects with the font displayed reflecting the color
combinations. Be careful if you have these cards.
The reason why this is called an "A"ttribute, rather than a
"C"olor parameter is because on non-color monitors, this
controls whether the letter is regular, high-intensity,
reverse, blinking etc. And none of these are in color.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PROMPTS AND MESSAGES
=-=-=
JLOCK: Enter password or <esc>
=-=-=
When the pop up menu is protected, this message will appear
to ask you to enter the password. When you type the
password, the letters do not appear on screen, but
backspacing will correct any mistyping if you noticed it.
End the password with a carriage return or type the escape
key to get out any time. You are given a default of three
tries to enter the proper password. And if you don't make
it, then the pop up menu will not appear.
=-=-=
Sorry, I cannot remove JLOCK because it is not in memory
=-=-=
If you tried to wipe JLOCK.EXE from memory when you did not
have one in memory, then you get this message.
=-=-=
You don't have to do it, JLOCK is already in memory
=-=-=
If you tried to run JLOCK.EXE when JLOCK.EXE was already in
memory, then you get this message.
=-=-=
Internal memory organization is destroyed !!!
I recommend that you warm reBOOT WITH THE CTL-ALT-DEL key combination
as soon as possible since the behavior of the machine is no longer
predictable. Do not ignore this error message!
=-=-=
You will get this long message if you tried to wipe JLOCK
from memory and something unexpected happened. This can
happen often if you were running BASIC to poke values into
memory without checking to see if you are allowed to do so
by consulting with DOS. JLOCK itself consults with DOS and
should not by itself cause this error.
=-=-=
JLOCK file with list of file names to protect not found
=-=-=
JLOCK.EXE could not find the file called JLOCK with the
list of file names and access codes in the diskette or
subdirectory you were in. Since this program's pop up menu
doesn't allow you to enter a list of file names, this
JLOCK.EXE must have a list of file names already present.
=-=-=
JLock was locked and not intended to come out of memory
=-=-=
The "L" command parameter was specified to prevent
JLOCK.EXE from being accidentally removed from memory by
typing "JLOCK W" at the DOS prompt.
=-=-=
There is not enough memory available to run this program
over another program. Sorry.
=-=-=
JLOCK.EXE noticed that there is less than 32 kilobytes of
free memory available. Since JLOCK.EXE will use about half
of this memory, there is not enough memory left over to run
any useful program over JLOCK.EXE. Under this condition,
JLOCK.EXE will not become memory resident.
=-=-=
|v.0.1a=Dr=Masaaki=Sawada=&=Assoc.======================|
|JLOCK and any other program(s) made by I and/or assoc. |
|was/were successfully removed from memory. |
|=======================================================|
=-=-=
This is the normal message displayed when JLOCK.EXE was
successfully wiped from memory.
=-=-=
|===============DR.J.LOCK==============|
|file xxxx allows |
| |
| |
| |
|v=0.1========================<f1>=help|
=-=-=
This is the appearance of the pop up menu with the "xxxx"
representing the name of the file itself. Type the page
up/down keys to look at the files and access types allowed.
Type the escape key to get out of the pop up.
The types of accesses you allowed will appear as the word
"open" if the "o" parameter followed the file name in the
list, as the word "rename" if the "n" parameter followed
the file name in the list, etc.
The screen is set for the reverse black letter on white
background format as default. To change it, use the
"A"ttribute parameter on the command line mentioned above.
Since the pop up can be protected by a password, would you
like to have the ability to change access types from this
menu? I'm always open to new suggestions.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TECHNICAL CHATS
Although this program relies upon the features present in
DOS 2 and cannot work from DOS 1, this program intercepts
the DOS 1 functions as well as the DOS 2 functions. The
reason is because even DOS 3.3 (the latest as of this
writing) relies upon features present in the original DOS 1
for many chores, including opening files, deleting files
etc.
Why intercept DOS 2 functions? DOS 2 has many features of
DOS 1 duplicated at a higher level. As a result, many
programs rely exclusively on DOS 2 functions to delete or
read a file, rather than use the comparable DOS 1
functions.
The double interception is used so that you cannot
accidentally delete a vital file from DOS or from a program
which allows access to DOS functions like deletion of
files.
Starting with DOS 3.0, there are two new ways to make
files: The "create unique file" function is not intercepted
since it is useful only for making temporary files which
are to be deleted or renamed anyway. The "create new file"
function is not intercepted since this function fails if
the file name already existed, avoiding the possibility of
overwriting a pre-existing file by the same name.
If you or a program then tries to delete or rename this
file, it can still be locked if the list of file names (in
the JLOCK file without any extension) happens to have the
name and no access is given for deletion or renaming of
this file. Like to have an option to use a file name other
than JLOCK without any extension? I'm all ears.
If you happen to be a local BBS operator, this program can
lock up your file with the list of passwords. Why? Because
some recent time bomb programs display fancy pictures on
screen, while copying the file with the list of passwords
to another location so that that file can be downloaded
later by the person who uploaded the time bomb. Clever, but
not clever enough.
This program is not meant to be an anti-virus program, but
this can serve as a flu-shot against some clever virus
programs coming out.
If you're looking for a program which will allow you to
protect each program with an automatic password protection,
coming up soon on CompuServe will be a program called
KONTROL.EXE.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Local BBS sysops and software distributors may distribute
this software and document for free or a nominal charge.
You are not allowed to make unauthorized modification to
the program prior to redistribution, except for spelling
mistakes or to change Canadian English for American or
other forms of languages on this documentation.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
All products and names mentioned are Trademarks or
Registered Trademarks of their respective corporations or
companies.
All enclosed programs, documents and other files are
provided AS IS, without any warranty, expressed or implied,
including but not limited to fitness for a particular
purpose.
If you find that this does not work in your machine, we
would like to know exactly what happened. With enough
information, including where the cursor was, what appeared
on screen, which DOS you used, which monitor/video-card,
etc, we may be able to make it work in your computer.
A contribution of $10 US/Canadian is appreciated if you
find this useful, or $20 for an improved one as it comes out.
(That's $20 Cdn if you're in Canada and $20 U.S. for U.S &
others.)
Unless you specify otherwise, you will get a 5-1/4" 360 kb
diskette. And if you only specify 3-1/2", it will be formatted
as 360kb/720kb on either a 720kb drive or a 1.44Mb drive.
Your negative criticisms are as welcome as your positive ones.
If you suggested improvements or reported bugs, then your
copy will be sent to you after the modification.
NAME OF THE PROGRAM:
JLOCK.EXE
PURPOSE OF THIS PROGRAM:
This program lets you prevent files from being opened
(copied), deleted, renamed or changed in file attribute such
as read-only, hidden etc.
my old forwarding address was
Dr. Masaaki Sawada
University of Waterloo, Faculty of Science
Waterloo, Ontario Canada N2L 3G1
the present address (SEE BOTTOM) is
Dr. Masaaki Sawada
Lady Davis Institute for Medical Research,
Sir M. B. Davis Jewish General Hospital,
3755 Chemin Cote Ste-Catherine,
Montreal, Quebec,
Canada H3T 1E2
The institute name is given instead of home address(es) to
lower the chances that any mail is delivered to a wrong
address (a common occurrence). However, no institute time
nor equipment was used to write this program or document.
+-+-+-+-+-+-+-+ SWEATING OVER THE ADDRESSES? +-+-+-+-+-+-+
After June - October 1989, or even now, if you're frustrated
by the cumbersome and ever shifting addresses, forward
letters to
c/o LCS
P.O. Box 956
Outremont, Quebec
Canada H2V 4R8
This doesn't change. And boy, is it short. (LCShort is an
interesting macro key program, and you'll soon hear about an
equally interesting macro key program called CTSYND on
CompuServe in a month or two, I hope.)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+